/**
 * User: cjay
 * Date: 23.10.11
 * Time: 11:19
 */
package ui {

import flash.events.MouseEvent;

public class IconMessageBox extends MessageIconBox {

    public var repeatButton:Button;
    public var cancelButton:Button;

    public function IconMessageBox() {

        repeatButton = new JButton();
        repeatButton.text = "Повторить";
        addChild(repeatButton);
        repeatButton.x = 190;
        repeatButton.y = 170;

        cancelButton = new JButton();
        cancelButton.text = "Пропустить";
        addChild(cancelButton);
        cancelButton.x = 330;
        cancelButton.y = 170;

        repeatButton.addEventListener(MouseEvent.CLICK, onOK);
        cancelButton.addEventListener(MouseEvent.CLICK, onCancel);

        }
    private function onOK(event:MouseEvent):void
    {
        event.stopImmediatePropagation();
        dispatchEvent(new UIEvent(UIEvent.BUTTON_RETRY));

    }
    private function onCancel(event:MouseEvent):void
    {
        event.stopImmediatePropagation();
        dispatchEvent(new UIEvent(UIEvent.BUTTON_CANCEL));

    }

}
}
